import { http } from "@/utils/http";
import type {
  AddProcurementForm,
  ProcurementForm,
  ApproveMainForm
} from "./type/procurementForm";

/** 查询库存 */
export const postFindMainList = (data?: ProcurementForm) => {
  return http.post<BackModel, ProcurementForm>(
    "/api/warehousing/findMainList",
    {
      data
    }
  );
};
/** 获取订单编号 */
export const getCode = (data?: ProcurementForm) => {
  return http.get<BackModel, ProcurementForm>("/api/warehousing/getCode", {
    data
  });
};
/** 新增入库单 */
export const postAddMain = (data?: AddProcurementForm) => {
  return http.post<BackModel, AddProcurementForm>("/api/warehousing/addMain", {
    data
  });
};
/** 审核入库单 */
export const postApproveMain = (data?: ApproveMainForm) => {
  return http.post<BackModel, ApproveMainForm>("/api/warehousing/approveMain", {
    data
  });
};
